import { rawRequestClient } from '#/api/request';

// 获取客户端列表
export function getClientList() {
  return rawRequestClient.get(`${import.meta.env.VITE_AUTH_SERVER}/clients`);
}

// 创建客户端
export function createClient(data: any) {
  return rawRequestClient.post(`${import.meta.env.VITE_AUTH_SERVER}/clients`, data);
}

// 获取客户端详情
export function getClientDetail(id: string) {
  return rawRequestClient.get(`${import.meta.env.VITE_AUTH_SERVER}/clients/${id}`);
}

// 更新客户端
export function updateClient(id: string, data: any) {
  return rawRequestClient.put(`${import.meta.env.VITE_AUTH_SERVER}/clients/${id}`, data);
}

// 删除客户端
export function deleteClient(id: string) {
  return rawRequestClient.delete(`${import.meta.env.VITE_AUTH_SERVER}/clients/${id}`);
}
